Jx.categorize('unit.scalar', {

	$extend: 'Jx.lib.Unit',
	
	numericRe: /^[0-9]+(\.[0-9]+)?$/,

	allowSetValue: function(operation, value){

		operation.value = value;

		return Jx.isString(value) || Jx.isNumber(value);

	},
	
	isNumeric: function(){
		
		return this.getNumericValue() !== false;
		
	},
	
	getNumericValue: function(){
		
		var value = this.getValue();
		
		return Jx.isNumber(value) ?
			
			value
			
			:
			
			Jx.isString(value) && this.numericRe.test(value) ?
			
				parseInt(value, 10)
				
				:
				
				false;

	},
	
	toHex: function(){
		
		return this.toInteger().toString(16);
		
	},
	
	toInteger: function(){
		
		return parseInt( this.toFloat(), 10 );

	},
	
	toFloat: function(){
		
		var value = this.getNumericValue();
		
		return Jx.isNumber(value) ?
			
			parseFloat(value)
			
			:
			
			0;
		
	}
	

});
